package com.fengshang.wedding.domain.model.api;

import java.util.ArrayList;
import java.util.Collection;

 
/**
 * User Value Object
 *@author gembin@gmail.com
 * 
 */
public class User implements IUser {

	private int id;

	private String name;

	private String password;

	private String email;

	private String qq;

	private String mobile;

	private String phone;

	private Gender gender=Gender.NONE;

	private String website;
	
	private Role role=Role.GUEST;
	
	public User(){
	}
	
	public User(IUser user){
		if(user!=null){
			this.id=user.getId();
			this.email=user.getEmail();
			this.gender=user.getGender();
			this.name=user.getName();
			this.role=user.getRole();
			this.password=user.getPassword();
			this.phone=user.getPhone();
			this.mobile=user.getMobile();
			this.qq=user.getQq();
			this.website=user.getWebsite();
		}
	}
	

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public Gender getGender() {
		return gender;
	}

	public void setGender(Gender gender) {
		this.gender = gender;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}


	public String getWebsite() {
		return website;
	}

	public void setWebsite(String website) {
		this.website = website;
	}
	
	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public String toString() {
		return new StringBuffer()
		.append("{id=")
		.append(id).append("\n")
		.append("name=")
		.append(name).append("\n")
		.append("password=")
		.append(password).append("\n")
		.append("role=")
		.append(role).append("\n")
		.append("email=")
		.append(email).append("\n")
		.append("qq=")
		.append(qq).append("\n")
		.append("mobile=")
		.append(mobile).append("\n")
		.append("phone=")
		.append(phone).append("\n")
		.append("gender=")
		.append(gender).append("\n")
		.append("website=")
		.append(website).append("\n")
		.append("}")
		.toString();
	}
	

}
